package mi.payment.ui.other;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import mi.payment.R;
import mi.payment.ui.admin.QRCodeTransactionActivity;
import mi.payment.ui.base.BaseInputAdminPwdActivity;

/**
 * 跳转到扫码类交易控制的输入主管密码界面
 *
 * @author Created by yiuhet on 2017/8/28.
 */

public class QRCodeTransactionSwitchAdminPwd extends BaseInputAdminPwdActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setAutoFinish(false);
        initData();
    }

    private void initData() {
        cardNumber.setVisibility(View.GONE);
        cardMoney.setVisibility(View.GONE);
        cardTime.setVisibility(View.GONE);
        cardProof.setVisibility(View.GONE);
        cardRefer.setVisibility(View.GONE);
        transactionType.setVisibility(View.GONE);
        ensureData.setVisibility(View.GONE);
        title.setTitleText(getString(R.string.qr_code_transaction_switch_settings));
    }


    @Override
    public void clickListener() {
        super.clickListener();
        if (isPasswordRight()) {
            startActivity(new Intent(this, QRCodeTransactionActivity.class));
            finish();
        } else {
            passwordInputView.clearText();
            showToast(getString(R.string.password_wrong));
        }
    }
}
